﻿using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace LeanBoard
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute("SmokeTest", // Route name
                            "SmokeTest/Results/{envName}", // URL with parameters
                            new { controller = "SmokeTest", action = "Results", envName = "Dev" } // Parameter defaults
                );

            routes.MapRoute("Default", // Route name
                            "{controller}/{action}/{team}/{release}/{filterall}", // URL with parameters
                            new { controller = "LeanBoard", action = "Index", team = UrlParameter.Optional, release = UrlParameter.Optional, filterall = UrlParameter.Optional } // Parameter defaults
                );


        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
        }
    }
}